package implementor;


import daoInterfaces.LeadsDao;
import dbhandelling.Crude;
import dto.LeadDto;

public class LeadsImp extends Crude implements LeadsDao
{

	@Override
	public void add(LeadDto leadDto) throws Exception
	{
		String[] values=new String[8];
		values[0]=leadDto.getEnquiryCode()+"";
		values[1]=leadDto.getCustomerId()+"";
		values[2]=leadDto.getBudget()+"";
		values[3]=leadDto.getInfoSourceCode()+"";
		values[4]=leadDto.getReference();
		values[5]=leadDto.getEnquiryDate()+"";
		values[6]=leadDto.getProductCode();
		values[7]=leadDto.getStateId()+"";
		values[8]=leadDto.getPriority();
		insert("Leads", values);
		
	}

	@Override
	public void update(LeadDto leadDto) throws Exception
	{
		// TODO Auto-generated method stub
		
	}

	@Override
	public void delete(LeadDto leadDto) {
		this.delete("Enquiry", "enquiryCode", leadDto.getEnquiryCode()+"");
		
	}

	@Override
	public LeadDto retrieve(String conditionField, String conditionValue) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public LeadDto[] retrieveArray(String conditionField, String conditionValue) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public LeadDto[] retrieveAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public LeadDto getLatest() {
		// TODO Auto-generated method stub
		return null;
	}

	
}
